package day_240510;

public class Test {
    public static void main(String[] args) {
        // 1. 排序 int[]
/*        int[] intArr = new int[] {3, 5, 1, 2, 9};
        MySortUtil.sort(intArr);*/

        // 2. 支持 Student[]
/*        Student s1 = new Student("小芳", 30);
        Student s2 = new Student("小红", 45);
        Student s3 = new Student("小张", 55);
        Student[] studentArr = new Student[] {s1, s2, s3};*/

        int size = 5;
        AbstractTest[] abstractTests = new Student[size];
        for (int i = 0; i < size; i++) {
            abstractTests[i] = new Student("小-" + i, 80 - i);
        }
        MySortUtil.print(abstractTests);
        MySortUtil.sort(abstractTests);
        MySortUtil.print(abstractTests);

        // 3. 支持 Dog[]
        abstractTests = new Dog[size];
        for (int i = 0; i < size; i++) {
            abstractTests[i] = new Dog("狗-" + i, 10 - i);
        }
        MySortUtil.print(abstractTests);
        MySortUtil.sort(abstractTests);
        MySortUtil.print(abstractTests);
    }
}